<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        *{
            margin: 0px;
            padding: 0px;
        }
        .father{
            width: 200px;
            height: 200px;
            background: red;
        }
        .son{
            width: 100px;
            height: 100px;
            background: blue;
        }
    </style>
    <script src="../node_modules/jquery/dist/jquery.js"></script>
</head>
<body>
<div class="father">
    <div class="son"></div>
</div>
<a href="http://www.baidu.com"><span>我是百度</span></a>
<form action="http://www.taobao.com">
    <input type="text">
    <input type="submit">
</form>
<script>
     $(function () {
         // $(".son").myClick(function (ev) {
         //     alert("son")
         // });
         /**
          * 想要自定义事件 必须满足两个条件
          * 1.事件必须是通过on绑定的
          * 2. 事件必须通过trigger来触发
          */
         $(".son").on('myClick',function () {
            alert("myClick")
         });
         $(".son").trigger("myClick");

     });
</script>
</body>
</html>